<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
        xmlns:composite="http://java.sun.com/jsf/composite"
        xmlns:h="http://java.sun.com/jsf/html">

    <!-- INTERFACE -->
  <composite:interface>
      <composite:attribute name="user" required="true"/>
      <composite:attribute name="loginManager" required="true"/>
  </composite:interface>

  <!-- IMPLEMENTATION -->
  <composite:implementation>
    <h2>#{msg.login}</h2>

    <h:form id="sendeRegistrierung">
        <div class="formblock">
            <h:outputText styleClass="error" value="#{msg.username_or_password_incorrect}" rendered="#{cc.attrs.loginManager.errorOccured}" />
            <h:messages styleClass="error" layout="table" />
            <fieldset>
                <div>
                    <h:outputLabel styleClass="Float" for="username" value="#{msg.username}" />
                    <h:inputText value="#{cc.attrs.user.login}" id="username" required="true" requiredMessage="#{msg.username} #{msg.required}" />
                </div>

                <div>
                    <h:outputLabel styleClass="Float" for="password" value="#{msg.password}" />
                    <h:inputSecret id="password" value="#{cc.attrs.user.password}" required="true" requiredMessage="#{msg.password} #{msg.required}" />
                </div>
            </fieldset>
        </div>
        <div id="buttons">
            <h:commandButton id="register" value="#{msg.login}" accesskey="r" action="#{loginManager.loginUser}" />
        </div>
    </h:form>
  </composite:implementation>
</html>